public class Test {
    public static void main(String[] args) {
        MySingleList mySingleList=new MySingleList();
        mySingleList.addFirst(12);
        mySingleList.addFirst(22);
        mySingleList.addFirst(32);
        mySingleList.addFirst(42);
        mySingleList.addFirst(52);
        mySingleList.addFirst(62);
        mySingleList.addLast(92);
        mySingleList.addIndex(0,50);
        mySingleList.display();
        System.out.println("==========================");
        System.out.println("==========================");
        System.out.println("==========================");
        System.out.println("============================");
        mySingleList.reverseList();
        int ret =mySingleList.middleNode();
        System.out.println(ret);
        int ret1=mySingleList.FindKthToTail(5);
        System.out.println(ret1);
        mySingleList.display();//为什么调用上面这个方法，不用接收返回值也可用display将其打印出来，是因为display方法从head位置开始打印，而我
        //reverse()方法就是返回head,通过调用reverse()会将链表中最后一个数据置为head,所以display从最后一个开始打印
    }
}
